function [out,scratchpad,header] = call_classifier(classifier,class_args,trainpats,traintargs,testpats,testtargs,header);
% [results] = call_classifier(class_args,trainpats,traintargs,testpats,testtargs);
%
% this script is called from any wrapper script, and determines
% which classifier to call based on the string in class_args.
%
% classifier is a string
%
%


switch lower(classifier)
 case 'gnb'
header.history{end+1} = sprintf('running class_gnb');
  [out scratchpad] = class_gauss(class_args, ...
				 trainpats, ...
				 traintargs, ...
				 testpats, ...
				 testtargs ...
				 );
 case 'bp'
  %header.history{end+1} = sprintf('running class_bp, layers = %i, nHidden = %i', class_args.layers,class_args.nHidden);
  header.history{end+1} = sprintf('running class_bp, layers = %i', class_args.layers);
  [out scratchpad] = class_bp(class_args, ...
			      trainpats, ...
			      traintargs, ...
			      testpats, ...
			      testtargs ...
			      );
  
 case 'rbf'
  header.history{end+1} = sprintf('running class_rbf, spread = %.2f',class_args.spread);
  [out scratchpad] = class_rbf(class_args, ...
			       trainpats, ...
			       traintargs, ...
			       testpats, ...
			       testtargs ...
			       );
 case 'log'
  header.history{end+1} = sprintf('running class_log, logistic regression');
  [out scratchpad] = class_logreg(class_args, ...
				  trainpats, ...
				  traintargs, ...
				  testpats, ...
				  testtargs ...
				  );
  
 otherwise
  error('Unknown classifier string.');
end


	
	




